﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace OplugAbpProject.Migrations
{
    public partial class AddERPModel : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "Photo",
                table: "Members",
                newName: "Avatar");

            migrationBuilder.CreateTable(
                name: "JobAsmbl",
                columns: table => new
                {
                    Id = table.Column<Guid>(nullable: false),
                    Company = table.Column<string>(maxLength: 8, nullable: false),
                    JobComplete = table.Column<bool>(nullable: false),
                    JobNum = table.Column<string>(maxLength: 14, nullable: false),
                    AssemblySeq = table.Column<int>(nullable: false),
                    PartNum = table.Column<string>(maxLength: 50, nullable: false),
                    Description = table.Column<string>(nullable: false),
                    RevisionNum = table.Column<string>(maxLength: 12, nullable: false),
                    QtyPer = table.Column<decimal>(nullable: false),
                    IUM = table.Column<string>(maxLength: 6, nullable: false),
                    RequiredQty = table.Column<decimal>(nullable: false),
                    PullQty = table.Column<decimal>(nullable: false),
                    WarehouseCode = table.Column<string>(maxLength: 8, nullable: false),
                    MtlBurRate = table.Column<decimal>(nullable: false),
                    EstUnitCost = table.Column<decimal>(nullable: false),
                    EstMtlBurUnitCost = table.Column<decimal>(nullable: false),
                    OverRunQty = table.Column<decimal>(nullable: false),
                    StartDate = table.Column<DateTime>(type: "date", nullable: true),
                    StartHour = table.Column<decimal>(nullable: false),
                    DueDate = table.Column<DateTime>(type: "date", nullable: true),
                    DueHour = table.Column<decimal>(nullable: false),
                    Parent = table.Column<int>(nullable: false),
                    PriorPeer = table.Column<int>(nullable: false),
                    NextPeer = table.Column<int>(nullable: false),
                    Child = table.Column<int>(nullable: false),
                    TotalCost = table.Column<decimal>(nullable: false),
                    MtlBurCost = table.Column<decimal>(nullable: false),
                    IssuedQty = table.Column<decimal>(nullable: false),
                    DrawNum = table.Column<string>(maxLength: 25, nullable: false),
                    IssuedComplete = table.Column<bool>(nullable: false),
                    CommentText = table.Column<string>(nullable: false),
                    InCopyList = table.Column<bool>(nullable: false),
                    BomSequence = table.Column<int>(nullable: false),
                    BomLevel = table.Column<int>(nullable: false),
                    WIStartDate = table.Column<DateTime>(type: "date", nullable: true),
                    WIStartHour = table.Column<decimal>(nullable: false),
                    WIDueDate = table.Column<DateTime>(type: "date", nullable: true),
                    WIDueHour = table.Column<decimal>(nullable: false),
                    TLALaborCost = table.Column<decimal>(nullable: false),
                    TLABurdenCost = table.Column<decimal>(nullable: false),
                    TLAMaterialCost = table.Column<decimal>(nullable: false),
                    TLASubcontractCost = table.Column<decimal>(nullable: false),
                    TLAMtlBurCost = table.Column<decimal>(nullable: false),
                    TLASetupHours = table.Column<decimal>(nullable: false),
                    TLAProdHours = table.Column<decimal>(nullable: false),
                    TLELaborCost = table.Column<decimal>(nullable: false),
                    TLEBurdenCost = table.Column<decimal>(nullable: false),
                    TLEMaterialCost = table.Column<decimal>(nullable: false),
                    TLESubcontractCost = table.Column<decimal>(nullable: false),
                    TLEMtlBurCost = table.Column<decimal>(nullable: false),
                    TLESetupHours = table.Column<decimal>(nullable: false),
                    TLEProdHours = table.Column<decimal>(nullable: false),
                    LLALaborCost = table.Column<decimal>(nullable: false),
                    LLABurdenCost = table.Column<decimal>(nullable: false),
                    LLAMaterialCost = table.Column<decimal>(nullable: false),
                    LLASubcontractCost = table.Column<decimal>(nullable: false),
                    LLAMtlBurCost = table.Column<decimal>(nullable: false),
                    LLASetupHours = table.Column<decimal>(nullable: false),
                    LLAProdHours = table.Column<decimal>(nullable: false),
                    LLELaborCost = table.Column<decimal>(nullable: false),
                    LLEBurdenCost = table.Column<decimal>(nullable: false),
                    LLEMaterialCost = table.Column<decimal>(nullable: false),
                    LLESubcontractCost = table.Column<decimal>(nullable: false),
                    LLEMtlBurCost = table.Column<decimal>(nullable: false),
                    LLESetupHours = table.Column<decimal>(nullable: false),
                    LLEProdHours = table.Column<decimal>(nullable: false),
                    AutoRecOpr = table.Column<int>(nullable: false),
                    FinalOpr = table.Column<int>(nullable: false),
                    FindNum = table.Column<string>(maxLength: 10, nullable: false),
                    ReceivedToStock = table.Column<decimal>(nullable: false),
                    Plant = table.Column<string>(maxLength: 8, nullable: false),
                    Direct = table.Column<bool>(nullable: false),
                    RelatedOperation = table.Column<int>(nullable: false),
                    TLAMaterialLabCost = table.Column<decimal>(nullable: false),
                    TLAMaterialMtlCost = table.Column<decimal>(nullable: false),
                    TLAMaterialSubCost = table.Column<decimal>(nullable: false),
                    TLAMaterialBurCost = table.Column<decimal>(nullable: false),
                    LLAMaterialLabCost = table.Column<decimal>(nullable: false),
                    LLAMaterialMtlCost = table.Column<decimal>(nullable: false),
                    LLAMaterialSubCost = table.Column<decimal>(nullable: false),
                    LLAMaterialBurCost = table.Column<decimal>(nullable: false),
                    TotalMtlMtlCost = table.Column<decimal>(nullable: false),
                    TotalMtlLabCost = table.Column<decimal>(nullable: false),
                    TotalMtlSubCost = table.Column<decimal>(nullable: false),
                    TotalMtlBurCost = table.Column<decimal>(nullable: false),
                    CallNum = table.Column<int>(nullable: false),
                    CallLine = table.Column<int>(nullable: false),
                    RestoreFlag = table.Column<string>(maxLength: 14, nullable: false),
                    AnalysisCode = table.Column<string>(maxLength: 8, nullable: false),
                    LastConfigDate = table.Column<DateTime>(type: "date", nullable: true),
                    LastConfigTime = table.Column<int>(nullable: false),
                    LastConfigUserID = table.Column<string>(maxLength: 75, nullable: false),
                    OrigRequiredQty = table.Column<decimal>(nullable: false),
                    UserMapData = table.Column<string>(nullable: false),
                    WhseAllocFlag = table.Column<bool>(nullable: false),
                    TLAMaterialMtlBurCost = table.Column<decimal>(nullable: false),
                    LLAMaterialMtlBurCost = table.Column<decimal>(nullable: false),
                    TLAMfgCompLabCost = table.Column<decimal>(nullable: false),
                    TLAMfgCompMtlCost = table.Column<decimal>(nullable: false),
                    TLAMfgCompSubCost = table.Column<decimal>(nullable: false),
                    TLAMfgCompBurCost = table.Column<decimal>(nullable: false),
                    TLAMfgCompMtlBurCost = table.Column<decimal>(nullable: false),
                    LLAMfgCompLabCost = table.Column<decimal>(nullable: false),
                    LLAMfgCompMtlCost = table.Column<decimal>(nullable: false),
                    LLAMfgCompSubCost = table.Column<decimal>(nullable: false),
                    LLAMfgCompBurCost = table.Column<decimal>(nullable: false),
                    LLAMfgCompMtlBurCost = table.Column<decimal>(nullable: false),
                    Weight = table.Column<decimal>(nullable: false),
                    WeightUOM = table.Column<string>(maxLength: 6, nullable: false),
                    OrigMtlSeq = table.Column<int>(nullable: false),
                    OrigRuleTag = table.Column<string>(nullable: false),
                    ValRefDes = table.Column<bool>(nullable: false),
                    BasePartNum = table.Column<string>(maxLength: 50, nullable: false),
                    BaseRevisionNum = table.Column<string>(maxLength: 12, nullable: false),
                    EstMtlUnitCost = table.Column<decimal>(nullable: false),
                    EstLbrUnitCost = table.Column<decimal>(nullable: false),
                    EstBurUnitCost = table.Column<decimal>(nullable: false),
                    EstSubUnitCost = table.Column<decimal>(nullable: false),
                    PlanAsAsm = table.Column<bool>(nullable: false),
                    PAARef = table.Column<string>(maxLength: 36, nullable: false),
                    PAAFirm = table.Column<bool>(nullable: false),
                    EstScrap = table.Column<decimal>(nullable: false),
                    EstScrapType = table.Column<string>(maxLength: 1, nullable: false),
                    SmartStringProcessed = table.Column<bool>(nullable: false),
                    SmartString = table.Column<string>(nullable: false),
                    ReqRefDes = table.Column<int>(nullable: false),
                    ReassignSNAsm = table.Column<bool>(nullable: false),
                    TLAODCCost = table.Column<decimal>(nullable: false),
                    AssemblyMatch = table.Column<string>(nullable: false),
                    JdfStatus = table.Column<string>(maxLength: 100, nullable: false),
                    PressDevice = table.Column<string>(nullable: false),
                    DigitalFileName = table.Column<string>(nullable: false),
                    PrepressJobName = table.Column<string>(maxLength: 100, nullable: false),
                    JdfPrepressAction = table.Column<string>(maxLength: 200, nullable: false),
                    SendToPress = table.Column<bool>(nullable: false),
                    RemovedFromPlan = table.Column<bool>(nullable: false),
                    SendToPressInitiator = table.Column<int>(nullable: false),
                    OperationType = table.Column<int>(nullable: false),
                    SendToPrePress = table.Column<bool>(nullable: false),
                    GroupSeq = table.Column<int>(nullable: false),
                    PartPlanInfo = table.Column<string>(nullable: false),
                    OrigStructTag = table.Column<string>(maxLength: 250, nullable: false),
                    ContractID = table.Column<string>(maxLength: 50, nullable: false),
                    LinkToContract = table.Column<bool>(nullable: false),
                    PCLinkRemoved = table.Column<bool>(nullable: false),
                    TenantId = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_JobAsmbl", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "JobHead",
                columns: table => new
                {
                    Id = table.Column<Guid>(nullable: false),
                    Company = table.Column<string>(maxLength: 8, nullable: false),
                    JobClosed = table.Column<bool>(nullable: false),
                    ClosedDate = table.Column<DateTime>(type: "date", nullable: true),
                    JobComplete = table.Column<bool>(nullable: false),
                    JobCompletionDate = table.Column<DateTime>(type: "date", nullable: true),
                    JobEngineered = table.Column<bool>(nullable: false),
                    JobReleased = table.Column<bool>(nullable: false),
                    JobHeld = table.Column<bool>(nullable: false),
                    SchedStatus = table.Column<string>(maxLength: 1, nullable: false),
                    JobNum = table.Column<string>(maxLength: 14, nullable: false),
                    PartNum = table.Column<string>(maxLength: 50, nullable: false),
                    RevisionNum = table.Column<string>(maxLength: 12, nullable: false),
                    DrawNum = table.Column<string>(maxLength: 25, nullable: false),
                    PartDescription = table.Column<string>(nullable: false),
                    ProdQty = table.Column<decimal>(nullable: false),
                    IUM = table.Column<string>(maxLength: 6, nullable: false),
                    StartDate = table.Column<DateTime>(type: "date", nullable: true),
                    StartHour = table.Column<decimal>(nullable: false),
                    DueDate = table.Column<DateTime>(type: "date", nullable: true),
                    DueHour = table.Column<decimal>(nullable: false),
                    ReqDueDate = table.Column<DateTime>(type: "date", nullable: true),
                    JobCode = table.Column<string>(maxLength: 8, nullable: false),
                    QuoteNum = table.Column<int>(nullable: false),
                    QuoteLine = table.Column<int>(nullable: false),
                    ProdCode = table.Column<string>(maxLength: 8, nullable: false),
                    CommentText = table.Column<string>(nullable: false),
                    ExpenseCode = table.Column<string>(maxLength: 16, nullable: false),
                    InCopyList = table.Column<bool>(nullable: false),
                    WIName = table.Column<string>(maxLength: 75, nullable: false),
                    WIStartDate = table.Column<DateTime>(type: "date", nullable: true),
                    WIStartHour = table.Column<decimal>(nullable: false),
                    WIDueDate = table.Column<DateTime>(type: "date", nullable: true),
                    WIDueHour = table.Column<decimal>(nullable: false),
                    Candidate = table.Column<bool>(nullable: false),
                    SchedCode = table.Column<string>(maxLength: 6, nullable: false),
                    SchedLocked = table.Column<bool>(nullable: false),
                    ProjectID = table.Column<string>(maxLength: 25, nullable: false),
                    WIPCleared = table.Column<bool>(nullable: false),
                    JobFirm = table.Column<bool>(nullable: false),
                    PersonList = table.Column<string>(nullable: false),
                    PersonID = table.Column<string>(maxLength: 8, nullable: false),
                    ProdTeamID = table.Column<string>(maxLength: 8, nullable: false),
                    QtyCompleted = table.Column<decimal>(nullable: false),
                    Plant = table.Column<string>(maxLength: 8, nullable: false),
                    DatePurged = table.Column<DateTime>(type: "date", nullable: true),
                    TravelerReadyToPrint = table.Column<bool>(nullable: false),
                    TravelerLastPrinted = table.Column<DateTime>(type: "date", nullable: true),
                    StatusReadyToPrint = table.Column<bool>(nullable: false),
                    StatusLastPrinted = table.Column<DateTime>(type: "date", nullable: true),
                    CallNum = table.Column<int>(nullable: false),
                    CallLine = table.Column<int>(nullable: false),
                    JobType = table.Column<string>(maxLength: 3, nullable: false),
                    RestoreFlag = table.Column<string>(maxLength: 14, nullable: false),
                    PhaseID = table.Column<string>(maxLength: 12, nullable: false),
                    AnalysisCode = table.Column<string>(maxLength: 8, nullable: false),
                    LockQty = table.Column<bool>(nullable: false),
                    HDCaseNum = table.Column<int>(nullable: false),
                    ProcessMode = table.Column<string>(maxLength: 1, nullable: false),
                    PlannedActionDate = table.Column<DateTime>(type: "date", nullable: true),
                    PlannedKitDate = table.Column<DateTime>(type: "date", nullable: true),
                    MSPTaskID = table.Column<string>(maxLength: 10, nullable: false),
                    MSPPredecessor = table.Column<string>(nullable: false),
                    UserMapData = table.Column<string>(nullable: false),
                    ProductionYield = table.Column<bool>(nullable: false),
                    OrigProdQty = table.Column<decimal>(nullable: false),
                    PreserveOrigQtys = table.Column<bool>(nullable: false),
                    NoAutoCompletion = table.Column<bool>(nullable: false),
                    NoAutoClosing = table.Column<bool>(nullable: false),
                    CreatedBy = table.Column<string>(maxLength: 75, nullable: false),
                    CreateDate = table.Column<DateTime>(type: "date", nullable: true),
                    WhseAllocFlag = table.Column<bool>(nullable: false),
                    OwnershipStatus = table.Column<string>(maxLength: 8, nullable: false),
                    PDMObjID = table.Column<string>(maxLength: 8, nullable: false),
                    ExportRequested = table.Column<string>(maxLength: 8, nullable: false),
                    SplitMfgCostElements = table.Column<bool>(nullable: false),
                    XRefPartNum = table.Column<string>(maxLength: 50, nullable: false),
                    XRefPartType = table.Column<string>(maxLength: 1, nullable: false),
                    XRefCustNum = table.Column<int>(nullable: false),
                    BasePartNum = table.Column<string>(maxLength: 50, nullable: false),
                    BaseRevisionNum = table.Column<string>(maxLength: 12, nullable: false),
                    RoughCutScheduled = table.Column<bool>(nullable: false),
                    EquipID = table.Column<string>(maxLength: 20, nullable: false),
                    PlanNum = table.Column<int>(nullable: false),
                    MaintPriority = table.Column<string>(maxLength: 2, nullable: false),
                    SplitJob = table.Column<bool>(nullable: false),
                    NumberSource = table.Column<bool>(nullable: false),
                    CloseMeterReading = table.Column<int>(nullable: false),
                    IssueTopics = table.Column<string>(maxLength: 256, nullable: false),
                    ResTopics = table.Column<string>(maxLength: 256, nullable: false),
                    Forward = table.Column<bool>(nullable: false),
                    SchedSeq = table.Column<int>(nullable: false),
                    PAAExists = table.Column<bool>(nullable: false),
                    DtlsWithinLeadTime = table.Column<bool>(nullable: false),
                    GroupSeq = table.Column<int>(nullable: false),
                    RoughCut = table.Column<bool>(nullable: false),
                    PlanGUID = table.Column<string>(maxLength: 256, nullable: false),
                    PlanUserID = table.Column<string>(maxLength: 50, nullable: false),
                    LastChangedBy = table.Column<string>(maxLength: 75, nullable: false),
                    LastChangedOn = table.Column<DateTime>(type: "date", nullable: true),
                    EPMExportLevel = table.Column<int>(nullable: false),
                    JobWorkflowState = table.Column<string>(maxLength: 50, nullable: false),
                    JobCSR = table.Column<string>(maxLength: 50, nullable: false),
                    ExternalMES = table.Column<bool>(nullable: false),
                    SysRevID = table.Column<byte[]>(type: "timestamp", maxLength: 8, rowVersion: true, nullable: true),
                    SysRowID = table.Column<Guid>(nullable: false),
                    LastExternalMESDate = table.Column<DateTime>(type: "date", nullable: true),
                    LastScheduleDate = table.Column<DateTime>(type: "date", nullable: true),
                    LastScheduleProc = table.Column<string>(maxLength: 20, nullable: false),
                    SchedPriority = table.Column<int>(nullable: false),
                    DaysLate = table.Column<int>(nullable: false),
                    ContractID = table.Column<string>(maxLength: 50, nullable: false),
                    ProjProcessed = table.Column<bool>(nullable: false),
                    SyncReqBy = table.Column<bool>(nullable: false),
                    CustName = table.Column<string>(maxLength: 50, nullable: false),
                    CustID = table.Column<string>(maxLength: 10, nullable: false),
                    IsCSRSet = table.Column<bool>(nullable: false),
                    UnReadyCostProcess = table.Column<bool>(nullable: false),
                    ProcSuspendedUpdates = table.Column<string>(maxLength: 50, nullable: false),
                    ProjProcessedDate = table.Column<DateTime>(nullable: true),
                    PCLinkRemoved = table.Column<bool>(nullable: false),
                    TenantId = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_JobHead", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "JobMtl",
                columns: table => new
                {
                    Id = table.Column<Guid>(nullable: false),
                    Company = table.Column<string>(maxLength: 8, nullable: false),
                    JobComplete = table.Column<bool>(nullable: false),
                    IssuedComplete = table.Column<bool>(nullable: false),
                    JobNum = table.Column<string>(maxLength: 14, nullable: false),
                    AssemblySeq = table.Column<int>(nullable: false),
                    MtlSeq = table.Column<int>(nullable: false),
                    PartNum = table.Column<string>(maxLength: 50, nullable: false),
                    Description = table.Column<string>(nullable: false),
                    QtyPer = table.Column<decimal>(nullable: false),
                    RequiredQty = table.Column<decimal>(nullable: false),
                    IUM = table.Column<string>(maxLength: 6, nullable: false),
                    LeadTime = table.Column<int>(nullable: false),
                    RelatedOperation = table.Column<int>(nullable: false),
                    MtlBurRate = table.Column<decimal>(nullable: false),
                    EstMtlBurUnitCost = table.Column<decimal>(nullable: false),
                    EstUnitCost = table.Column<decimal>(nullable: false),
                    IssuedQty = table.Column<decimal>(nullable: false),
                    TotalCost = table.Column<decimal>(nullable: false),
                    MtlBurCost = table.Column<decimal>(nullable: false),
                    ReqDate = table.Column<DateTime>(type: "date", nullable: true),
                    WarehouseCode = table.Column<string>(maxLength: 8, nullable: false),
                    SalvagePartNum = table.Column<string>(maxLength: 50, nullable: false),
                    SalvageDescription = table.Column<string>(nullable: false),
                    SalvageQtyPer = table.Column<decimal>(nullable: false),
                    SalvageUM = table.Column<string>(maxLength: 6, nullable: false),
                    SalvageMtlBurRate = table.Column<decimal>(nullable: false),
                    SalvageUnitCredit = table.Column<decimal>(nullable: false),
                    SalvageEstMtlBurUnitCredit = table.Column<decimal>(nullable: false),
                    SalvageQtyToDate = table.Column<decimal>(nullable: false),
                    SalvageCredit = table.Column<decimal>(nullable: false),
                    SalvageMtlBurCredit = table.Column<decimal>(nullable: false),
                    MfgComment = table.Column<string>(nullable: false),
                    VendorNum = table.Column<int>(nullable: false),
                    PurPoint = table.Column<string>(maxLength: 4, nullable: false),
                    BuyIt = table.Column<bool>(nullable: false),
                    Ordered = table.Column<bool>(nullable: false),
                    PurComment = table.Column<string>(nullable: false),
                    BackFlush = table.Column<bool>(nullable: false),
                    EstScrap = table.Column<decimal>(nullable: false),
                    EstScrapType = table.Column<string>(maxLength: 1, nullable: false),
                    FixedQty = table.Column<bool>(nullable: false),
                    FindNum = table.Column<string>(maxLength: 10, nullable: false),
                    RevisionNum = table.Column<string>(maxLength: 12, nullable: false),
                    SndAlrtCmpl = table.Column<bool>(nullable: false),
                    RcvInspectionReq = table.Column<bool>(nullable: false),
                    Plant = table.Column<string>(maxLength: 8, nullable: false),
                    Direct = table.Column<bool>(nullable: false),
                    MaterialMtlCost = table.Column<decimal>(nullable: false),
                    MaterialLabCost = table.Column<decimal>(nullable: false),
                    MaterialSubCost = table.Column<decimal>(nullable: false),
                    MaterialBurCost = table.Column<decimal>(nullable: false),
                    SalvageMtlCredit = table.Column<decimal>(nullable: false),
                    SalvageLbrCredit = table.Column<decimal>(nullable: false),
                    SalvageBurCredit = table.Column<decimal>(nullable: false),
                    SalvageSubCredit = table.Column<decimal>(nullable: false),
                    APSAddResType = table.Column<string>(maxLength: 1, nullable: false),
                    CallNum = table.Column<int>(nullable: false),
                    CallLine = table.Column<int>(nullable: false),
                    ProdCode = table.Column<string>(maxLength: 8, nullable: false),
                    UnitPrice = table.Column<decimal>(nullable: false),
                    BillableUnitPrice = table.Column<decimal>(nullable: false),
                    DocBillableUnitPrice = table.Column<decimal>(nullable: false),
                    ResReasonCode = table.Column<string>(maxLength: 8, nullable: false),
                    PricePerCode = table.Column<string>(maxLength: 2, nullable: false),
                    Billable = table.Column<bool>(nullable: false),
                    ShippedQty = table.Column<decimal>(nullable: false),
                    DocUnitPrice = table.Column<decimal>(nullable: false),
                    QtyStagedToDate = table.Column<decimal>(nullable: false),
                    AddedMtl = table.Column<bool>(nullable: false),
                    MiscCharge = table.Column<bool>(nullable: false),
                    MiscCode = table.Column<string>(maxLength: 4, nullable: false),
                    SCMiscCode = table.Column<string>(maxLength: 4, nullable: false),
                    RFQNeeded = table.Column<bool>(nullable: false),
                    RFQVendQuotes = table.Column<int>(nullable: false),
                    RFQNum = table.Column<int>(nullable: false),
                    RFQLine = table.Column<int>(nullable: false),
                    RFQStat = table.Column<string>(maxLength: 1, nullable: false),
                    AnalysisCode = table.Column<string>(maxLength: 8, nullable: false),
                    GlbRFQ = table.Column<bool>(nullable: false),
                    WhseAllocFlag = table.Column<bool>(nullable: false),
                    WIReqDate = table.Column<DateTime>(type: "date", nullable: true),
                    Rpt1BillableUnitPrice = table.Column<decimal>(nullable: false),
                    Rpt2BillableUnitPrice = table.Column<decimal>(nullable: false),
                    Rpt3BillableUnitPrice = table.Column<decimal>(nullable: false),
                    Rpt1UnitPrice = table.Column<decimal>(nullable: false),
                    Rpt2UnitPrice = table.Column<decimal>(nullable: false),
                    Rpt3UnitPrice = table.Column<decimal>(nullable: false),
                    BaseRequiredQty = table.Column<decimal>(nullable: false),
                    BaseUOM = table.Column<string>(maxLength: 6, nullable: false),
                    Weight = table.Column<decimal>(nullable: false),
                    WeightUOM = table.Column<string>(maxLength: 6, nullable: false),
                    ReqRefDes = table.Column<int>(nullable: false),
                    BasePartNum = table.Column<string>(maxLength: 50, nullable: false),
                    BaseRevisionNum = table.Column<string>(maxLength: 12, nullable: false),
                    SelectForPicking = table.Column<bool>(nullable: false),
                    StagingWarehouseCode = table.Column<string>(maxLength: 8, nullable: false),
                    StagingBinNum = table.Column<string>(maxLength: 10, nullable: false),
                    PickError = table.Column<string>(maxLength: 2, nullable: false),
                    EstMtlUnitCost = table.Column<decimal>(nullable: false),
                    EstLbrUnitCost = table.Column<decimal>(nullable: false),
                    EstBurUnitCost = table.Column<decimal>(nullable: false),
                    EstSubUnitCost = table.Column<decimal>(nullable: false),
                    SalvageEstMtlUnitCredit = table.Column<decimal>(nullable: false),
                    SalvageEstLbrUnitCredit = table.Column<decimal>(nullable: false),
                    SalvageEstBurUnitCredit = table.Column<decimal>(nullable: false),
                    SalvageEstSubUnitCredit = table.Column<decimal>(nullable: false),
                    LoanedQty = table.Column<decimal>(nullable: false),
                    BorrowedQty = table.Column<decimal>(nullable: false),
                    ReassignSNAsm = table.Column<bool>(nullable: false),
                    GeneralPlanInfo = table.Column<string>(nullable: false),
                    EstStdDescription = table.Column<string>(nullable: false),
                    PricingUOM = table.Column<string>(maxLength: 6, nullable: false),
                    RemovedFromPlan = table.Column<bool>(nullable: false),
                    IsPOCostingMaintained = table.Column<bool>(nullable: false),
                    EstStdType = table.Column<int>(nullable: false),
                    POCostingFactor = table.Column<decimal>(nullable: false),
                    PlannedQtyPerUnit = table.Column<decimal>(nullable: false),
                    POCostingDirection = table.Column<int>(nullable: false),
                    POCostingUnitVal = table.Column<decimal>(nullable: false),
                    GroupSeq = table.Column<int>(nullable: false),
                    OrigStructTag = table.Column<string>(maxLength: 250, nullable: false),
                    OrigGroupSeq = table.Column<int>(nullable: false),
                    ShowStatusIcon = table.Column<string>(maxLength: 10, nullable: false),
                    ContractID = table.Column<string>(maxLength: 50, nullable: false),
                    LinkToContract = table.Column<bool>(nullable: false),
                    StagingLotNum = table.Column<string>(maxLength: 30, nullable: false),
                    PCLinkRemoved = table.Column<bool>(nullable: false),
                    TenantId = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_JobMtl", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "JobAsmbl");

            migrationBuilder.DropTable(
                name: "JobHead");

            migrationBuilder.DropTable(
                name: "JobMtl");

            migrationBuilder.RenameColumn(
                name: "Avatar",
                table: "Members",
                newName: "Photo");
        }
    }
}
